package com.ruoyi.project.mydy.busiapply.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mydy.busiapply.mapper.DlBusiApplyMapper;
import com.ruoyi.project.mydy.busiapply.domain.DlBusiApply;
import com.ruoyi.project.mydy.busiapply.service.IDlBusiApplyService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 商家入驻审核申请记录Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-07
 */
@Service
public class DlBusiApplyServiceImpl implements IDlBusiApplyService 
{
    @Autowired(required = false)
    private DlBusiApplyMapper dlBusiApplyMapper;

    /**
     * 查询商家入驻审核申请记录
     * 
     * @param id 商家入驻审核申请记录主键
     * @return 商家入驻审核申请记录
     */
    @Override
    public DlBusiApply selectDlBusiApplyById(Long id)
    {
        return dlBusiApplyMapper.selectDlBusiApplyById(id);
    }

    /**
     * 查询商家入驻审核申请记录列表
     * 
     * @param dlBusiApply 商家入驻审核申请记录
     * @return 商家入驻审核申请记录
     */
    @Override
    public List<DlBusiApply> selectDlBusiApplyList(DlBusiApply dlBusiApply)
    {
        return dlBusiApplyMapper.selectDlBusiApplyList(dlBusiApply);
    }

    /**
     * 新增商家入驻审核申请记录
     * 
     * @param dlBusiApply 商家入驻审核申请记录
     * @return 结果
     */
    @Override
    public int insertDlBusiApply(DlBusiApply dlBusiApply)
    {
        dlBusiApply.setCreateTime(DateUtils.getNowDate());
        return dlBusiApplyMapper.insertDlBusiApply(dlBusiApply);
    }

    /**
     * 修改商家入驻审核申请记录
     * 
     * @param dlBusiApply 商家入驻审核申请记录
     * @return 结果
     */
    @Override
    public int updateDlBusiApply(DlBusiApply dlBusiApply)
    {
        return dlBusiApplyMapper.updateDlBusiApply(dlBusiApply);
    }

    /**
     * 批量删除商家入驻审核申请记录
     * 
     * @param ids 需要删除的商家入驻审核申请记录主键
     * @return 结果
     */
    @Override
    public int deleteDlBusiApplyByIds(String ids)
    {
        return dlBusiApplyMapper.deleteDlBusiApplyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商家入驻审核申请记录信息
     * 
     * @param id 商家入驻审核申请记录主键
     * @return 结果
     */
    @Override
    public int deleteDlBusiApplyById(Long id)
    {
        return dlBusiApplyMapper.deleteDlBusiApplyById(id);
    }
}
